import { ElNotification } from 'element-plus'
import { ElMessage } from 'element-plus'

// 展示消息 'success' | 'warning' | 'info' | 'error'
export function showMessage(message, type = 'success') {
  if(type === 'error') {
    ElMessage.error(message)
  } else {
    ElMessage({
      message: message,
      type: type,
    })
  }
}

// 展示通知
export function showNotification(title, message, type = 'success') {
  ElNotification({
    title,
    message,
    type
  })
}
